package tester;

/**
 * Created by IntelliJ IDEA.
 * User: aleck
 * Date: 2007-10-23
 * Time: 0:48:45
 * To change this template use File | Settings | File Templates.
 */
public class SinglePersonTesterThread extends BaseTesterThread {
  private final Person person;
  private final ProblemManager problems;

  public SinglePersonTesterThread(Person person, ProblemManager problems) {
    this.person = person;
    this.problems = problems;
  }

  public void run() {
    for (Problem problem : problems.problemList) {
      if (person.finished(problem.name)) {
        PersonProblemTester spt =
            new PersonProblemTester(person, problem, Config.getWorkDir());
        spt.runTest();
      }
      MessageOutput.println(finishedMessage);
    }
  }
}
